<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../taglib.jsp"%>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>后台系统日志</title>
    <link rel="stylesheet" href="/assets/css/layui.css" media="all">

</head>
<body style="padding:20px 100px 0 100px">
<div class="demoTable">
    操作用户：
    <div class="layui-inline">
        <input class="layui-input" name="username" id="username" autocomplete="off">
    </div>&nbsp;&nbsp;&nbsp;&nbsp;
    用户名称：
    <div class="layui-inline">
        <input class="layui-input" name="realname" id="realname" autocomplete="off">
    </div>&nbsp;&nbsp;&nbsp;&nbsp;
    操作模块：
    <div class="layui-inline">
        <input class="layui-input" name="sysModule" id="sysModule" autocomplete="off">
    </div>&nbsp;&nbsp;&nbsp;&nbsp;
    操作状态：
    <div class="layui-inline">
        <input class="layui-input" name="available" id="available" autocomplete="off">
    </div>&nbsp;&nbsp;
    <button class="layui-btn" data-type="reload">搜索</button>
</div>
<table class="layui-hide" id="LAY_table_user" lay-filter="user"></table>
<script src="/assets/layui.js"></script>
<script>
    layui.use('table', function(){
        var table = layui.table;
        $ = layui.jquery, laypage = layui.laypage, layer = parent.layer === undefined ? layui.layer: parent.layer;
        table.render({
            elem: '#LAY_table_user'
            ,url: '/log/getLogsList'
            ,cols: [[
                {checkbox: true, fixed: true}
                ,{field:'id', title: 'ID', width:300, sort: true, fixed: true}
                ,{field:'sysModule', title: '操作模块', width:200}
                ,{field:'logDescribe', title: '操作描述', width:350, sort: true}
                ,{field:'userid', title: '操作用户', width:150}
                ,{field:'user', title: '操作用户', width:150}
                ,{field:'responseTime', title: '响应时间', sort: true, width:100}
                ,{field:'availableVo', title: '操作状态', width:100}
                ,{field:'datelineVo', title: '操作时间', sort: true, width:238}
            ]]
            ,id: 'log'
            ,page: true
            ,limit: 10
        });

        var $ = layui.$, active = {
            reload: function(){
                var demoReload = $('#demoReload');
                table.reload('log', {
                    where: {
                        id: $("#demoReload").val()
                    },
                    request: {
                        id: $("#demoReload").val()
                    }
                });
            }
        };
        $('.demoTable .layui-btn').on('click', function(){
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });
</script>
</body>
</html>
